package mypackage;

public class Spot {
    private double x;
    private double y;
    private double z;

    public Spot() {}

    public Spot(double a, double b, double c) {
        x = a;
        y = b;
        z = c;
    }

    public double getX() { return x; }

    public void setX(double a) { x = a; }

    public double getY() { return y; }

    public void setY(double b) { y = b; }

    public double getZ() { return z; }

    public void setZ(double c) { z = c; }

    public void count1(Spot s) {
        double m = Math.sqrt((x - s.x) * (x - s.x) + (y - s.y) * (y - s.y) +
                (z - s.z) * (z - s.z));
        System.out.println("两点的距离：" + m);
    }

    public void print() {
        System.out.println("点的x坐标：" + x + "点的y坐标：" + y + "点的z坐标：" +
                z);
    }
}